home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / processes / mp threaded sort / printingutils.cp < prev    next >
Encoding:
Text File  |  2000-09-28  |  1.4 KB  |  56 lines

  1. /*
  2.     File:        PrintingUtils.cp
  3.  
  4.     Contains:    Useful printing utilities
  5.  
  6.     Written by: Dave Falkenburg, based on code from Dave Hershey    
  7.  
  8.     Copyright:    Copyright © 1993-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/27/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 9/27/94        DRF                 AppLib.h is now Sprocket.h
  21.  
  22. */
  23.  
  24. #include "Sprocket.h"
  25.  
  26. #if    qUseQuickDrawGX
  27.  
  28. #include <graphics macintosh.h>
  29. #include <graphics routines.h>
  30. #include <PrintingManager.h>
  31.  
  32.  
  33. //    PrintingEventOverride is our generic event handler for QuickDrawGX.
  34. //    It alows us to handle events while the QuickDrawGX movable modal
  35. //    printing dialogs are displayed.
  36.  
  37. OSErr
  38. PrintingEventOverrideForGX(EventRecord *anEvent, Boolean filterEvent)
  39.     {
  40.     if (!filterEvent)
  41.         switch (anEvent->what)
  42.             {
  43.             case mouseDown:
  44.             case keyDown:
  45.             case autoKey:
  46.                 break;
  47.  
  48.             default:
  49.                 HandleEvent(anEvent);
  50.             }
  51.  
  52.     return noErr;
  53.     }
  54.  
  55. #endif
  56.